<template>
		<div class="ListNav" >
			<div class="tab">
				<div class="li" v-for="(item, key, index) in activelist"  :key="index"   :index="item.index" :class="{active:item.index==orderselectindex}"  @click="handleSelect(item)">{{item.name}}
					<div class="after"></div>
				</div>
				
			</div>
		</div>
</template>
<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		props:['activelist'],
		name: "SidebarNav",
		data() {
			return {
				selected:null,
			}
		},
		computed:{
			...mapGetters([
				'orderselectindex'
			])
		},	
		methods: {
			...mapActions({
				getorderselectindex:'getorderselectindex'
			}),
			handleSelect(i){
				if(i.router!=false){
				this.$router.push(i.index)
				}
				this.getorderselectindex(i.index)
			}
		}
	}
</script>

<style lang="less">
	
</style>
